package Math;

public class math {
    public static void main(String[] args) {
        waterNumber();
    }

    //统计水仙花数
//    100-999
    public static void waterNumber() {
        int count = 0;
        for (int i = 100; i < 999; i++) {
            if (i == (Math.pow(i % 10, 3) + Math.pow((i / 10) % 10, 3) + Math.pow((i / 100) % 10, 3))) {
                System.out.println(i);
                count++;
            }
        }
        System.out.println(count);
    }
}
